Video encoding method for encoding division block, video decoding method for decoding division block, and recording medium for implementing the same

ABSTRACT

Disclosed are a method of encoding a division block in video encoding and a method of decoding a division block in video decoding. An input picture is divided into encoding unit blocks. The encoding unit blocks are divided into sub-blocks. The sub-blocks are encoded by selectively using at least one of intra prediction encoding and inter prediction encoding. A decoding process is performed through a reverse process of the encoding method. When pixel values of an encoding unit block are encoded in video encoding, the flexibility in selecting an encoding mode is increased and the efficiency of encoding is increased.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a continuation application of U.S. patentapplication Ser. No. 17/361,528, filed on Jun. 29, 2021, which is acontinuation application of U.S. patent application Ser. No. 16/572,704,filed on Sep. 17, 2019, which is a Continuation application of U.S.application Ser. No. 15/855,019 filed on Dec. 27, 2017, now U.S. Pat.No. 10,462,494 issued on Oct. 29, 2019, which is a Continuation ofapplication Ser. No. 15/258,655 filed on Sep. 7, 2016, now U.S. Pat. No.9,888,259 issued on Feb. 6, 2018, which is a Continuation of applicationSer. No. 13/202,906 having a 371(c) date of Oct. 10, 2011, now U.S. Pat.No. 9,485,512 issued on Nov. 1, 2016, which is a U.S. national stageapplication of International Application No. PCT/KR2010/001125 filed onFeb. 23, 2010, which claims the benefit of Korean Patent Application No.10-2009-0076753 filed on Aug. 19, 2009 and Korean Patent Application No.10-2009-0015013 filed on Feb. 23, 2009, in the Korean IntellectualProperty Office, the entire disclosures of which are incorporated hereinby reference for all purposes.

TECHNICAL FIELD

The present invention relates to video encoding and decoding methodscapable of dividing an input picture in units of blocks and encoding anddecoding a division block by simultaneously using intra and interprediction encoding, and more particularly to video encoding anddecoding methods of encoding and decoding a division block through interand intra predictions in video encoding that can improve encodingefficiency and further improve encoding efficiency by encoding a blockvideo signal by use of a square transform or a non-square transformaccording to a size of the division block.

BACKGROUND ART

International Organization for Standardization/InternationalElectrotechnical Commission (ISO/IEC) 14496-10 (Moving Picture ExpertsGroup (MPEG)-4 Part 10 Advanced Video Coding) or H.264, which is videocompression/encoding technology jointly standardized in ISO/IEC andInternational Telecommunication Union-Telecommunication Standardization(ITU-T), an ISO/IEC 14496-10 Amendment 3 (MPEG-4 Scalable Video Coding)standard, a video codec-1 (VC-1), which is an Society of Motion Pictureand Television Engineers (SMPTE) standard, an audio video codingstandard (AVS), and the like have achieved significant advance in termsof video data compression efficiency.

There are various factors for improving video compression efficiency. Inparticular, a process of sub-dividing a macroblock in units of 16×16,16×8, 8×16, 8×8, 8×4, 4×8, and 4×4, prediction-encoding sub-blocks, andencoding a block for minimizing cost in an optimum block mode in termsof rate-distortion cost is performed, unlike existing video encodingstandards (MPEG-1 Video, MPEG-2 Video, MPEG-4 Part 2 Visual, H.261,H.263, and the like) in which prediction encoding is performed after asize of a picture to be encoded is divided in units of macroblocks (eachof which has 16×16 pixels).

Thereby, a micro motion or a motion of a complex video may be moreeffectively predicted, and compression efficiency may be significantlyimproved by significantly reducing a generated residual signal.

FIG. 1 is a diagram showing seven types of motion prediction blockdivisions used in H.264 as division block types of 16×16 macroblock unitblocks to be encoded in an H.264/advanced video coding (AVC) encoder ofthe related art.

In a block-based prediction encoding method as shown in FIG. 1 , anencoding process is generally performed by dividing an input video intomacroblock units having a size of 16×16. In particular, in the ISO/IEC14496-10 (MPEG-4 Advanced Video Coding) or H.264 standard, predictionencoding is performed by dividing a macroblock into seven types ofsub-blocks as shown in FIG. 1 and finally selecting a block forminimizing the rate-distortion cost.

When intra encoding of sub-blocks into which a 16×16 macroblock to beencoded is divided is performed, the macroblock is subjected to intraprediction encoding in a size of one 16×16 pixel unit. Alternatively,after the macroblock is divided into sub-blocks, intra predictionencoding of four 8×8 blocks or sixteen 4×4 blocks is performed.

In general, the above-described intra prediction encoding techniqueefficient in terms of the reduction of the number of cases of variousblock modes in low definition video encoding, but has a problem in highdefinition (HD) or ultra high definition (UHD) video encoding. That is,in the case of a super-macroblock having a size of 32×32 or more towhich a 16×16 macroblock as an encoding unit block is extended, encodingefficiency is degraded if all divided block modes within thesuper-macroblock are applied to the same intra prediction based on a16×16, 8×8, or 4×4 block as in the existing method.

In other words, it should be noted that all divided blocks are encodedby only intra or inter prediction encoding in a prediction encodingmethod based on division blocks in the related art. That is, only one ofthe intra prediction encoding and the inter prediction encoding isselected and applied to a division block without applying both the intraprediction encoding and the inter prediction encoding to the divisionblock. This may result in a gain of encoding efficiency in image orvideo compression at an H D rate or less due to simplicity of a syntaxexpressing a block encoding mode obtained by applying only one of intraand inter encoding, but may become a factor that degrades the encodingefficiency when a unit of encoding is a super-macroblock that has thesame or greater size than a macroblock.

DISCLOSURE OF INVENTION Technical Problem

The present invention has been made to solve the above-describedproblem, and an object of the invention is to provide a more effectiveprediction encoding method that performs an encoding process byextending a method of selecting intra or inter prediction encoding forsub-division blocks of a divided block during video encoding so thatboth intra and inter prediction encoding modes can be selected andselectively applying a square or non-square transform kernel to aresidual signal according to a block size after motion compensation ofthe divided block.

Another object of the present invention is to provide acomputer-readable recording medium for implementing the method.

Technical Solution

According to an example embodiment of the present invention forachieving the above-described object, there is provided a video encodingmethod, including: dividing an input picture into encoding unit blocks;dividing the encoding unit blocks into sub-blocks; and encoding thesub-blocks by selectively using at least one of intra predictionencoding and inter prediction encoding.

The video encoding method may further include: transforming residualsignals through the encoding unit blocks and the sub-blocks byselectively applying a variable block-size transform kernel according toa block size; quantizing the transformed residual signals; andentropy-encoding results of quantization.

The residual signals through the sub-blocks may be encoded byselectively applying one or more de-blocking filters according to theblock size and an encoding type.

A size of the encoding unit block may be a square having an N*N size,and the encoding unit block may be divided into one or more square ornon-square sub-blocks having any size.

When the square or non-square sub-blocks are encoded using the interprediction encoding, the sub-blocks may be encoded by selecting one ofintra prediction encoding methods.

When the intra prediction encoding or inter prediction encoding of thesquare or non-square sub-blocks is performed, the entropy encoding maybe performed by scanning a quantized transform coefficient selectedaccording to a block size.

The square sub-blocks may be transformed by applying a square transformkernel.

When the square sub-blocks are transformed by applying the squaretransform kernel, a square transform kernel having a size of the smalleror same number of pixels may be applied by comparing the number ofhorizontal pixels of the square sub-block with the number of verticalpixels.

The non-square sub-blocks may be transformed by applying a non-squaretransform kernel.

When the non-square sub-blocks are transformed by applying thenon-square transform kernel, a non-square transform kernel having a sizeof the smaller or same number of pixels may be applied by comparing thenumber of horizontal pixels of the non-square sub-block with the numberof vertical pixels.

According to another example embodiment of the present invention, thereis provided a method of encoding a division block in video encoding,including: (a) inputting a picture to be encoded; (b) dividing the inputpicture into encoding unit blocks; (c) dividing each input encoding unitblock into sub-blocks; (d) performing intra prediction encoding andinter prediction encoding of the encoding unit block and the sub-blocksand selecting one block type among the encoding unit block and thesub-blocks; and (e) performing intra prediction encoding and/or interprediction encoding of the encoding unit block and the sub-blocks by useof a prediction result of the block type.

According to still another example embodiment of the present invention,there is provided a method of encoding a division block in videoencoding, including: (a′) inputting a picture to be encoded; (b′)dividing the input picture into encoding unit blocks; (c′) determiningwhether to perform inter prediction encoding of a current input picture;(d′) initializing an index of a sub-block of an encoding unit block tobe encoded in the input picture if the current input picture correspondsto inter prediction; (e′) selecting a block mode of the encoding unitblock to be encoded; (f′) determining whether to perform both intra andinter prediction encoding of the selected block mode; (g′) performingthe intra and inter prediction encoding of the selected block mode if itis determined to perform both the intra and inter prediction encoding ofthe selected block mode; (h′) storing a prediction encoding result and arate-distortion cost value of step (g′); (i′) if the selected block modeis a final mode, determining encoding by comparing rate-distortion costsfor respective block modes and selecting a final block mode for theencoding unit block; (j′) determining whether a current encoding unitblock is a final block in the current input picture; and (k′)determining whether the current input picture is a final picture if thecurrent encoding unit block is the final block in the current inputpicture, and iterating steps (a′) to (j′) until the current inputpicture becomes the final picture.

The method may further include: after step (c′), performing the intraprediction encoding if the current input picture does not correspond tothe inter prediction.

The method may further include: after step (f′), performing the interprediction encoding of the selected block mode if it is not determinedto perform both the intra and inter prediction encoding of the selectedblock mode.

The method may further include: after step (g′), obtaining a residualsignal through motion prediction and compensation if the interprediction encoding of the selected block mode is performed;transforming the selected block by use of the residual signal;quantizing the transformed selected block; and entropy-encoding a resultof quantization.

The method may further include: after step (g′), obtaining a residualsignal through the intra prediction encoding if the intra predictionencoding of the selected block mode is performed; transforming theselected block by use of the residual signal; quantizing the transformedselected block; and entropy-encoding a result of quantization.

The method may further include: performing a transform by selectivelyapplying a transform kernel according to a block size when the selectedblock is transformed using the residual signal.

According to still another example embodiment of the present invention,there is provided a method of decoding a division block in videodecoding, comprising: (A) inputting a bitstream to be decoded; (B)determining whether the input bitstream corresponds to inter prediction;(C) performing intra prediction encoding if the input bitstream issubjected to intra prediction encoding; (D) analyzing a slice if theinput bitstream corresponds to the inter prediction; (E) analyzing aunit encoding block within the slice; (F) decoding an encoding mode of aunit encoding sub-division block; (G) analyzing whether a sub-divisionencoding block is an inter prediction encoding block; (H) performinginter prediction decoding if the sub-division encoding block correspondsto the inter prediction; (I) performing intra prediction decoding if thesub-division encoding block corresponds to intra prediction; (J)configuring unit decoding block pixels from sub-division decodingresults; (K) configuring slice pixels from decoding unit block results;and (K) configuring a picture from slice pixel configuration results.Accordingly, it is possible to perform intra and/or inter predictiondecoding.

Step (C) may further include: if the unit encoding block is asuper-macroblock having the same or greater size than a 16×16macroblock, performing intra prediction decoding by decoding asub-division block encoding mode corresponding to the size of thesuper-macroblock.

Step (C) may further include: performing intra prediction decoding byapplying a de-blocking filter corresponding to a size of a sub-divisionblock.

Step (C) may further include the step of: performing intra predictiondecoding by applying a de-blocking filter according to a size of asub-division block.

Step (F) may further include: if the unit encoding block is asuper-macroblock having the same or greater size than a 16×16macroblock, decoding a sub-division block encoding mode corresponding tothe size of the super-macroblock.

Step (H) may further include: performing intra prediction decoding byapplying a square or non-square transform kernel corresponding to a sizeof a sub-division block and decoding an encoded quantized transformcoefficient.

Step (H) may further include: performing intra prediction decoding byapplying an inverse quantization method according to a size of asub-division block and a decoding mode condition of a peripheraldecoding block and decoding an encoded quantized transform coefficient.

Step (H) may further include: performing inter prediction decoding byapplying a de-blocking filter corresponding to a size of a sub-divisionblock.

According to yet another example embodiment of the present invention,there is provided a computer-readable recording medium storing a programfor causing a computer to execute the above-described method.

Advantageous Effects

When pixel values of an encoding unit block are encoded in videoencoding according to the present invention, a divided block is encodedin an intra or inter prediction encoding mode by applying at least oneof intra prediction encoding and inter prediction encoding to a dividedsub-block or its sub-division blocks, and prediction encoding isperformed using both intra and inter predictions for an encoding unitblock or its sub-division blocks, so that the flexibility of encodingmode selection can be increased and the efficiency of encoding can beincreased.

In prediction encoding based on division blocks according to the presentinvention, each division block is encoded by selectively applying a sizeof a variable block-size transform kernel according to a size of thedivision block so that both the intra and inter predictions can beapplied to sub-division blocks. Therefore, it is possible tosignificantly improve encoding efficiency.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a diagram showing division block types of 16×16 macroblockunit blocks to be encoded in an H.264/advanced video coding (AVC)encoder of the related art.

FIG. 2 is a diagram showing super-macroblock unit blocks and divisionblock types for intra or inter prediction encoding in an encoderaccording to an example embodiment of the present invention.

FIG. 3 is a flowchart illustrating a method of encoding a division blockin video encoding according to an example embodiment of the presentinvention.

FIG. 4 is a flowchart illustrating a method of decoding a bitstreamencoded in a video division block mode according to an exampleembodiment of the present invention.

BEST MODE FOR CARRYING OUT THE INVENTION

Hereinafter, example embodiments of the present invention will bedescribed in detail with reference to the accompanying drawings. Thesame elements are denoted by the same reference numerals throughout thedrawings. Detailed description related to well-known functions orconfigurations will be omitted if they make the subject matter of thepresent invention unclear.

FIG. 2 is a diagram showing super-macroblock unit blocks and divisionblock types for intra or inter prediction encoding in an encoderaccording to an example embodiment of the present invention. FIG. 2 is adiagram showing an example of super-macroblocks, which have larger sizesthan a macroblock of a 16×16 pixel unit, and block division typesapplied to an example embodiment of the present invention.

As shown in FIG. 2 , a process of dividing a super-macroblock intosub-blocks and intra or inter prediction encoding the division blocks isperformed, and the super-macroblock is encoded so that both intra andinter prediction encoding modes can be used as a final encoding mode.Therefore, it is possible to very effectively increase video encodingefficiency. In practice, it is possible to perform encoding by selectinga block mode capable of minimizing rate-distortion cost as shown inEquation 1.

J _(MODE)(s,r,MODE|QP,λ _(MODE))=SSD(s,r,MODE|QP)+λ_(MODE)R(s,r,MODE|QP)  Equation 1

Here, J_(MODE) denotes a rate-distortion function for a block encodingmode, s denotes an original block pixel input to be encoded, r denotes areference video pixel input, QP denotes a quantization parameter,denotes a Lagrange multiplier dependent on a mode, and MODE denotes adivision block mode type.

Also, if transform encoding is applied to a residual signal of asuper-macroblock having an increased size, it is possible to increaseencoding efficiency by selectively applying a square transform kernelhaving a size of 16×16 or more, which is greater than existing sizes of4×4 and 8×8, or a non-square transform kernel having a size of 16×8,8×16, or more for a non-square transform according to a size of adivision block.

If the square transform kernel having the size of 16×16 or more isapplied to the super-macroblock, it is possible to carry out acalculation as shown in Equation 2.

Y=AX  Equation 2

Here, X denotes an N×N input video signal matrix, A denotes an N×Nsquare transform kernel matrix, and Y denotes a transform coefficientmatrix. If a sub-block after division is a non-square block, a transformis performed as shown in Equation 3.

Y=A ₁ XA ₂  Equation 3

Here, when an input video signal X is an M×(M/2) matrix, A₁ denotes anM×M square transform kernel matrix, A₂ denotes an (M/2)×(M/2) squaretransform kernel matrix, and Y denotes a transform coefficient matrix.

When a square or non-square kernel transform is applied according to anexample embodiment of the present invention, it is preferable to performtransform encoding by performing a comparison with the smaller number ofpixels between the number of horizontal pixels and the number ofvertical pixels of a division block and applying a kernel having a sizethat is equal to or less than the smaller number of pixels.

FIG. 3 is a flowchart illustrating a method for encoding a divisionblock in video encoding according to an example embodiment of thepresent invention.

Referring to FIG. 3 , first, an index of a picture i to be encoded isinitialized (i=0) (S101). The picture i is input in sequence forencoding (S102).

Next, the input picture i is divided into encoding unit blocks (S103).In an example embodiment of the present invention, the encoding unitblock may be a macroblock or super-macroblock.

Next, it is checked whether to perform inter prediction encoding of acurrent picture i (S104). If the current picture i does not correspondto inter prediction, intra prediction encoding is performed (S105).Otherwise, if the current picture i corresponds to inter prediction, anindex of an encoding unit block j to be encoded within the one picture iis initialized 0=0) (S106).

Thereafter, the unit block j to be encoded is divided into sub-blocks(S107). An index of a sub-block mode k is initialized (k=0) (S108). Oneof sub-block modes k is selected (S109).

It is checked whether or not to perform intra and inter predictions forthe sub-block mode to be encoded in the encoding unit block (S110). Ifit is checked to perform the intra and inter predictions, intra andinter encoding are performed (S111). Otherwise, only inter predictionencoding is performed (S112). A prediction encoding result and arate-distortion cost value are stored as encoding results (S113).

It is checked whether the sub-block mode k is a final block node (S114).If the sub-block mode k is not the final block mode, steps S109 to S113are iterated for the next block mode. On the other hand, if thesub-block mode k is the final block mode, an optimum division block isdetermined and corresponding encoding results are finally selected(S115).

It is determined whether a current encoding unit block j is a finalblock in the current picture i (S116). If the current encoding unitblock j is not the final block, steps S107 to S115 are iterated byinputting the next encoding unit block.

If it is determined in step S116 that the current encoding unit block jis the final block in the current picture i, it is checked whether thecurrent picture i is a final picture (S117). If the current picture i isthe final picture, the algorithm ends. Otherwise, the algorithm returnsto step S102, the next picture is input, and steps S102 to S116 areiterated.

FIG. 4 is a flowchart illustrating a method of decoding a bitstreamencoded in a video division block mode according to an exampleembodiment of the present invention.

Referring to FIG. 4 , first, an index of a picture i to be decoded isinitialized (i=0) (S201). An encoded picture bitstream i is input insequence for decoding (S202).

Next, it is checked whether an input picture bitstream i corresponds tointer prediction encoding (S203). If a current picture bitstream i doesnot correspond to the inter prediction encoding, intra predictiondecoding is performed (S207). Otherwise, if the input picture bitstreami corresponds to the inter prediction encoding, an index of a slice j tobe decoded within one picture i is initialized 0=0) (S204).

Next, slice information regarding the input picture bitstream isanalyzed (S205). An index of a unit decoding block j to be decodedwithin each slice within one picture i is initialized (k=0) (S206). Inan example embodiment of the present invention, the decoding unit blockmay be a macroblock or a super-macroblock.

Next, after information regarding each unit encoding block is analyzed(S208), an index of a division sub-block within the unit encoding blockis initialized (m=0) (S209). Thereafter, an encoding mode of a divisionsub-block within the unit encoding block is decoded (S210). After it ischecked whether the division sub-block is an inter prediction encodingblock (S211), inter prediction decoding is performed if the sub-block isthe inter prediction encoding block (S213), and intra predictionencoding is performed if the sub-block is an intra prediction encodingblock or mode (S212).

Thereafter, pixel values of the sub-division block are recovered usingsub-block encoding results (S214). After it is checked whether a currentsub-division block m is the final block (S215), pixel values of a unitdecoding block are configured if the current sub-division block m is thefinal block (S216). Otherwise, the algorithm returns to step S210 fordecoding the next division sub-block, and steps S210 to S214 areperformed.

After it is checked whether a current unit encoding block k is a finalunit encoding block (S217), slice pixels are configured if the currentunit encoding block k is the final unit encoding block (S218).Otherwise, the algorithm returns to step S208, and steps S208 to S216are performed. After it is checked whether a current slice j is a finalslice (S219), picture pixels are configured if the current slice j isthe final slice (S220). Otherwise, steps S205 to S218 are performed.After it is determined whether a current picture i is a final picture(S221), the algorithm ends if the current picture i is the finalpicture. Otherwise, the algorithm returns to step S202, the nextbitstream is input, and steps S202 to S220 are performed.

In video encoding according to an embodiment of the present invention,an input video is divided into encoding unit blocks. After the encodingunit block is sub-divided into sub-blocks, each sub-division block isencoded by selectively using at least one of intra prediction and interprediction.

Thereby, encoding can be performed using both inter and intra predictionsub-block modes in an encoding mode of an encoding unit block andsimultaneously a variable block-size transform kernel is selectivelyapplied, so that encoding efficiency can be improved.

In video decoding according to an example embodiment of the presentinvention, it is possible to decode a compressed bitstream with improvedencoding efficiency by performing the reverse process of encoding.

As another example embodiment of the present invention, theabove-described method of encoding a division block in video encodingcan be implemented as computer-readable codes on a computer-readablerecording medium. The computer-readable recording medium includes alltypes of recording devices storing data readable by a computer system.

Examples of the computer-readable recording medium include a read onlymemory (ROM), a random access memory (RAM), a compact disk-read onlymemory (CD-ROM), a magnetic tape, a hard disk, a floppy disk, a mobilestorage, a flash memory, an optical data storage, etc. Furthermore, thecomputer-readable recording medium may be implemented in the form ofcarrier waves (e.g., transmission over the Internet).

Further, the computer-readable recording medium is distributed tocomputer systems connected to each other through a computercommunication network, so that the computer-readable codes can be storedin a distribution manner and executed thereby.

Although preferred embodiments of an inter prediction encoding methodand/or an inter prediction encoding method in video encoding anddecoding methods, which are reverse processes thereof, have beendescribed, the example embodiments are illustrative and the presentinvention is not limited thereto. Those skilled in the art willunderstand that various modifications and changes may be made thereinwithout departing from the spirit and scope of the invention as definedby the appended claims.

Sequence Listing Free Text

Encoding, decoding, inter prediction, intra prediction, transformkernel, square transform kernel, non-square transform kernel,quantization, MPEG, rate-distortion cost, H.264/MPEG-4 Part 10 AdvancedVideo Coding.

1. An apparatus for video decoding, the apparatus comprising: a receiver configured to receive a video data sequence of encoded video data, wherein the video data sequence includes a slice and the slice includes coding unit blocks, wherein the sub-coding blocks are divided into first sub-coding unit blocks, wherein at least one of the first sub-coding unit blocks is divided into second sub-coding unit blocks, and wherein one of the divided first or second sub-coding unit blocks is a square block; and a decoder configured to: decode an encoding mode corresponding to a sub-coding unit block among the divided first or second sub-coding unit blocks; perform either an intra prediction or an inter prediction on the corresponding sub-coding unit block based on the decoded encoding mode; and transform residual signals of the corresponding sub-coding unit block, wherein at least one of variable sizes of transform kernels is selectively applied to the corresponding sub-coding unit block, and wherein the at least one of variable sizes of transform kernels is selected according to a size of the corresponding sub-coding unit block.
 2. The apparatus of claim 1, wherein the second sub-coding unit blocks are recursively divided into further sub-coding unit blocks until the further-divided sub-coding unit blocks correspond to final coding unit blocks. 